package com.cym.utils;

import com.fasterxml.jackson.annotation.JsonInclude;

import cn.hutool.json.JSONUtil;

/**
 * Author: D.Yang Email: koyangslash@gmail.com Date: 16/8/31 Time: 下午5:50
 * Describe: 封装Json返回信息
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class JsonResult<T> {
	private boolean success;
	private String status;
	private String msg;
	private String time;
	private T obj;

	
	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String toString() {
		return JSONUtil.toJsonStr(this);
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public T getObj() {
		return obj;
	}

	public void setObj(T obj) {
		this.obj = obj;
	}

}
